package classWork;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class digui {
    public static void main(String[] args) {
        Map<Character,Integer> map = new HashMap<>();
        Scanner sc =new Scanner(System.in);
        String s = sc.next();
        char[] chars = s.toCharArray();
        for (char aChar : chars) {
            System.out.println(aChar);
        }
        for (int i = 0; i < chars.length; i++) {
            char charr = chars[i];
            if (!map.containsKey(charr)){
                map.put(charr,1);
            }else {
                map.put(charr,map.get(charr)+1);
            }
        }
        System.out.println(map);
    }
}
